<?php
/**
 * Each engineer has a duty to keep the code elegant
 * Created by wolffy.
 * Author @wolffy<13750088090@sina.cn>
 * Date: 2018/8/14
 * Time: 17:39
 */
namespace App\Http\Controllers\Api\V1_0_1;

use App\Http\Requests\Api\V1_0_1\PersonalAccountWithdrawRequest;
use App\Services\GalleryService;
use App\Services\PersonalAccountWithdrawService;
use App\Services\UserProfitService;
use Illuminate\Http\Request;

class GalleryController extends ApiController
{
    protected $galleryService;

    public function __construct(GalleryService $galleryService)
    {
        $this->galleryService = $galleryService;
    }

    /**
     * 图库
     * @return \Illuminate\Http\JsonResponse
     */
    public function gallery(Request $request)
    {
        if (empty($request->image_type)) {
            return $this->responseJson(422);
        }
        return $this->galleryService->getImages($request->image_type);
    }

}